namespace player
{
    public class IdleState : State
    {
        public override void Enter()
        {
            base.Enter();

            player.ResetVelocity();
        }

        public override void Process()
        {
            base.Process();

            if (!player.IsGroundDetected() && player.TryChangeState(StateCode.Fall)) return;
            if (player.input.GamePlay.Jump.WasPressedThisFrame() && player.TryChangeState(StateCode.Jump)) return;
            if (player.input.GamePlay.Attack.WasPressedThisFrame() && player.TryChangeState(StateCode.Attack)) return;
            if (player.moveInput.x != 0 && player.TryChangeState(StateCode.Run)) return;
        }
    }
}